<?php

namespace app\admin\model\wu;

use think\Model;

class Stockproductspec extends Model
{
    // 表名
    protected $name = 'wu_stockproductspec';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [

    ];


    public function getSpectypeList()
    {
        return ['1' => __('半成品'), '2' => __('半成品(白刀)'), '3' => __('成品(球刀/銑刀)'), '4' => __('調撥單(白刀成品)')];
    }




    public function productspec()
    {
        return $this->belongsTo('Productspec', 'productspec_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
